'use strict'
import moment from 'moment'
import store from './../../store'

// 創建人模塊
export class Creator {
    constructor() {
        this.setCreator()
    }

    setCreator = () => {
        // const dateNow = moment().format('YYYY-MM-DD HH:mm:ss')
        // const user = store.state.user.user
        // this.creator = ['', undefined, null].includes(user.userName) ? 'system'
        //     : user.userName
        // this.createOn = dateNow
        // this.mofifier = ['', undefined, null].includes(user.userName) ? ''
        //     : user.userName
        // this.modifyOn = dateNow
    };
}

export class DeviceInfo extends Creator{
    constructor() {
        super();
        this.devicecode = null;
        this.devicename= null;
        this.devicetypecode= null;
        this.ip= null;
        this.parentid= null;
        this.port = 0
    }
}
export class DeviceType extends Creator{
    constructor() {
        super();
        this.typecode = null;
        this.typename= null;
        this.productline= null;
        this.typeimage= null;
    }
}
export class Dictionary extends Creator{
    constructor() {
        super();
        this.guid = null;
        this.modelname = null;
        this.modelkey= null;
        this.modelvalue= null;
        this.parentmodelkey= null;
        this.sortno= null;
        this.icon= null;
        this.remark= null;
    }
}
export class Menu extends Creator{
    constructor() {
        super();
        this.guid = null;
        this.menuid = null;
        this.menutype= null;
        this.menuname= null;
        this.parentid= null;
        this.actionname= null;
        this.icon= null;
        this.active = null;
        this.sortno = null;
        this.remark= null;
    }
}
export class User extends Creator{
    constructor() {
        super();
        this.guid = null;
        this.username = null;
        this.password = null;
        this.realname = null;
    }
}
export class Role extends Creator{
    constructor() {
        super();
        this.guid = null;
        this.rolename = null;
        this.rolecode = null;
    }
}
